/**
 * 
 */
package org.cuatrovientos.erp.model;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.springframework.context.annotation.Bean;

/**
 * @author pablo_guerrero
 *
 */
public class City {
	
	@Min(value=1,message="{city.id.error}")
	private int id;
	
	@NotNull(message="{city.name.error}")
	private String name;
	
	@Min(value=10000,message="{city.zipcode.minerror}")
	@Max(value=99999,message="{city.zipcode.maxerror}")
	private int zipcode;
	
	@Min(value=1,message="{city.idstate.error}")
	private int idstate;
	
	/**
	 * Default constructor
	 */
	public City(){
		
	}
	
	/**
	 * Constructor
	 * @param id
	 * @param name
	 * @param zipcode
	 * @param idstate
	 */
	public City(int id, String name, int zipcode, int idstate){
		this.id = id;
		this.name = name;
		this.zipcode = zipcode;
		this.idstate= idstate;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the zipcode
	 */
	public int getZipcode() {
		return zipcode;
	}

	/**
	 * @param zipcode the zipcode to set
	 */
	public void setZipcode(int zipcode) {
		this.zipcode = zipcode;
	}

	/**
	 * @return the idstate
	 */
	public int getIdstate() {
		return idstate;
	}

	/**
	 * @param idstate the idstate to set
	 */
	public void setIdstate(int idstate) {
		this.idstate = idstate;
	}
}
